using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebFoundation;
using WebFoundation.Data;
using MHI.InspectionManager.Data; 
using MHI.InspectionManager.Interfaces; 

namespace MHI.InspectionManager.Business
{
	/// <summary>
	/// DevSparepartTList, table list:dev_sparepart_t 
	/// </summary>
	internal class DevSparepartTList : BaseWritableEntities<DevSparepartT>, IDevSparepartTList
	{
		private DevSparepartTQueryDAO _queryDAO;
		private DevSparepartTWritingDAO _writeDAO;

		public DevSparepartTList(DevSparepartTQueryDAO queryDao, DevSparepartTWritingDAO writtingDao) : base(queryDao, writtingDao)
		{
			this._queryDAO = queryDao;
			this._writeDAO = writtingDao;
		}

		/// <summary>
		/// 获取所有DevSparepartT,table items:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public IEnumerable<DevSparepartT> GetDevSparepartTAllItems()
		{
			return _queryDAO.GetDevSparepartTAllItems().ToList();
		}

		/// <summary>
		/// 根据id，获取所有DevSparepartT,table items:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public IEnumerable<DevSparepartT> GetDevSparepartTItemsById(int id)
		{
			return _queryDAO.GetDevSparepartTItemsById(id);
		}

		/// <summary>
		/// 增加一行DevSparepartT,table item:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public bool AddDevSparepartT(DevSparepartT item)
		{
			return this._writeDAO.AddDevSparepartT(item);
		}

		/// <summary>
		/// 增加多行DevSparepartT,table items:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public bool AddDevSparepartTs(DevSparepartT[] items)
		{
			return this._writeDAO.AddDevSparepartTs(items);
		}

		/// <summary>
		/// 更新一行DevSparepartT,table item:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public bool UpdateDevSparepartT(DevSparepartT item)
		{
			return this._writeDAO.UpdateDevSparepartT(item);
		}

		/// <summary>
		///  更新多行DevSparepartT,table items:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public bool UpdateDevSparepartTs(DevSparepartT[] items)
		{
			return this._writeDAO.UpdateDevSparepartTs(items);
		}

		/// <summary>
		/// 删除一行DevSparepartT,table item:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public bool DeleteDevSparepartT(DevSparepartT item)
		{
			return this._writeDAO.DeleteDevSparepartT(item);
		}

		/// <summary>
		///  删除多行DevSparepartT,table items:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public bool DeleteDevSparepartTs(DevSparepartT[] items)
		{
			return this._writeDAO.DeleteDevSparepartTs(items);
		}

		/// <summary>
		///  根据ids，删除多行DevSparepartT,table entity:dev_sparepart_t信息 
		/// </summary>
		/// <returns></returns>
		public bool DeleteDevSparepartTByIds(int[] ids)
		{
			return this._writeDAO.DeleteDevSparepartTByIds(ids);
		}

	}
}
